<%@ include file="/WEB-INF/jsp/include/head.jsp" %><%@ page language="java" pageEncoding="UTF-8"%>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${locale}">
<head>
    <%@ include file="/WEB-INF/jsp/include/title.jsp" %>
    <%@ include file="/WEB-INF/jsp/include/common_css.jsp" %>
    <link rel="stylesheet" type="text/css" media="screen" href="<c:url value="/css/skin/default/default.css"/>"/>
    <%@ include file="/WEB-INF/jsp/include/common_script.jsp" %>
    <script type="text/javascript">
    //<![CDATA[
    function menuOut(event) {
        $(this).attr("class", "menu_out");
    }
    
    function menuOver(event) {
        $(this).attr("class", "menu_over");
    }
               
    $(document).ready(function() {    
        $(".menu_out").bind("mouseover", menuOver).bind("mouseout", menuOut);

        $("#" + "<c:out value='${(empty param.bbsId) ? \"home\" : param.bbsId}' />").addClass("menuselected");

        $("#locale").change(function (event) {
			// location.href = "changeLocale.do?locale=" + $("#locale > option:selected").val();
            location.href = "<c:url value='/changeLocale/' />" + $("#locale > option:selected").val();
        });

        $("#locale > option").each(function () {
            if($(this).val() == '${locale}')
                $(this).attr("selected", "true");
        });
    });        
    //]]>
    </script>        
</head>
<body>
<%@ include file="/WEB-INF/jsp/include/top.jsp" %>
    <div id="contents">
        <div id="contentCenter">
            <div class="mainBox">
                <spring:message code="main.notice" />
                <jsp:include page="/bbs/recent.do" flush="true">
                    <jsp:param name="bbsId" value="SagaNotice" />
                    <jsp:param name="size" value="5" />
                </jsp:include>
            </div>
            <div class="mainBox">
            	<spring:message code="wiki.recent" />
                <jsp:include page="/bbs/recent.do" flush="true">
                    <jsp:param name="isNew" value="true" />
                    <jsp:param name="size" value="10" />
                </jsp:include>
            </div>
            <div class="mainBox">
				<spring:message code="wiki.recentUpdate" />
                <jsp:include page="/bbs/recent.do" flush="true">
                    <jsp:param name="isNew" value="false" />
                    <jsp:param name="size" value="10" />
                </jsp:include>
            </div>
        </div>
        <div id="contentLeft">
        	<div class="mainLeftBox">
        	    <%--Favorits<br />
        	    <a href="http://www.springsource.com/">Spring</a><br />
        	    <a href="http://www.jquery.com/">jQuery</a><br />
        	    <a href="http://www.apache.org/">Apache S/W Foundation</a><br />
        	    J2SE API <a href="http://java.sun.com/j2se/1.5.0/docs/api/">5.0</a><br />
        	    SERVLET 2.4<br />
        	    JSP 2.0<br />
        	    XHTML 1.0<br />--%>
        	<jsp:include page="/bbs/recentMemo.do" flush="true">
                <jsp:param name="size" value="10" />
            </jsp:include>
        	</div>
        </div>        
        <div id="contentRight">
            <div class="mainRightBox">
                <jsp:include page="/spec/recent.do" flush="true">
                 	<jsp:param name="size" value="10" />
                </jsp:include>
            </div>
        </div>
        <div style="clear:both;"></div>
    </div>
<%@ include file="/WEB-INF/jsp/include/footer.jsp" %>
</body>
</html>
<%--<h2>Your principal object is:</h2>
<div class="alertMsg">request.getUserPrincipal()</div>

<sec:authorize ifAllGranted="ROLE_ANONYMOUS">
    <p><a href="http://www.yahoo.com">Yahoo</a></p>
</sec:authorize>
<sec:authorize ifAnyGranted="ROLE_ADMIN,ROLE_SUPER_USER">
    <p><a href="http://www.google.com">Google</a></p>
</sec:authorize>
<sec:authentication property="name" /
//<div class="alertMsg"><%//=request.getUserPrincipal()</div>
//            <div>
//                <h2>Your principal object is:</h2>
//                        java.util.Enumeration e = request.getSession().getAttributeNames();
//                        while(e.hasMoreElements()) {
//                            out.println(e.nextElement() + "<br />");
//                        }
                        
        //                out.println(request.getSession().getAttribute("SPRING_SECURITY_CONTEX"));
        //                out.println(request.getSession().getAttribute("SPRING_SECURITY_LAST_USERNAME"));
                //<sec:authentication property="principal.username"/>
                //<sec:authentication property="principal.enabled"/>
                //<sec:authentication property="principal.accountNonLocked"/>
/*            </div>
            
            <br /> 
            <sec:authorize ifAllGranted="BF_QUOTE_CREATE">
                <p><a href="http://www.yahoo.com">Yahoo</a></p>
            </sec:authorize>
            <sec:authorize ifAllGranted="ROLE_ADMIN">
                <p><a href="manager/main.do">Manager Page</a></p>
            </sec:authorize>
            <sec:authorize ifAnyGranted="ROLE_ADMIN, ROLE_SUPER_USER">
                <p><a href="http://www.google.com">Google</a></p>
            </sec:authorize>
            <br />
            <sec:authentication property="name" />
            */
--%>